import axios from '@/utils/request';
export class JobApi {
  // 查询
  static query(): Promise<any> {
    return axios.get('/api/batch/admin/job/query');
  }
  // 更新
  static update(data: any): Promise<any> {
    return axios.post('/api/batch/admin/job/reschedule', data);
  }
  // 新增
  static add(data: any): Promise<any> {
    return axios.post('/api/batch/admin/job/add', data);
  }

  // 删除
  static delete(params: any): Promise<any> {
    return axios.post('/api/batch/admin/job/delete', params);
  }
  // 暂停
  static pause(params: any): Promise<any> {
    return axios.post('/api/batch/admin/job/pause', params);
  }
  // 重启
  static reschedule(params: any): Promise<any> {
    return axios.post('/api/batch/admin/job/reschedule', params);
  }
  // 手动执行
  static run(params: any): Promise<any> {
    return axios.post('/api/batch/admin/job/run', params);
  }
}
